package com.iplant.wms.serviceImpl.dao.wms;

import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.wms.service.po.wms.WMSResource;
import lombok.extern.slf4j.Slf4j;

import java.util.*;

@Slf4j
@DBBaseDAO(WMSResource.class)
public class WMSResourceDAO extends BaseDAO {

    private static WMSResourceDAO Instance = null;

    private WMSResourceDAO() {
        super("");
        this.Init();
    }

    public static WMSResourceDAO getInstance() {
        if (Instance == null)
            Instance = new WMSResourceDAO();
        return Instance;
    }


    public List<WMSResource> WMS_QueryResourceList(BMSEmployee wLoginUser, int wStoreID, int wStoreRegionID,
                                                   int wStoreAreaID, int wStoreShelfID, int wStoreStationID, List<Integer> wStationID,
                                                   List<Integer> wMaterialID, Pagination wPagination, OutResult<Integer> wErrorCode) {
        Map<String, Object> wParams = new HashMap<String, Object>();
        wParams.put("StoreID", wStoreID);
        wParams.put("StoreRegionID", wStoreRegionID);
        wParams.put("StoreAreaID", wStoreAreaID);
        wParams.put("StoreShelfID", wStoreShelfID);
        wParams.put("StoreStationID", wStoreStationID);
        wParams.put("StationID", wStationID);
        wParams.put("MaterialID", wMaterialID);

        return this.SelectPOList(wLoginUser, wParams, wPagination, wErrorCode);
    }


}
